(0) Obligation:

The Runtime Complexity (innermost) of the given CpxTRS could be proven to be BOUNDS(1, n^2).


The TRS R consists of the following rules:

le(0, y) → true
le(s(x), 0) → false
le(s(x), s(y)) → le(x, y)
minus(x, 0) → x
minus(0, x) → 0
minus(s(x), s(y)) → minus(x, y)
gcd(0, y) → y
gcd(s(x), 0) → s(x)
gcd(s(x), s(y)) → if_gcd(le(y, x), s(x), s(y))
if_gcd(true, x, y) → gcd(minus(x, y), y)
if_gcd(false, x, y) → gcd(minus(y, x), x)

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted Cpx (relative) TRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
minus(z0, 0) → z0
minus(0, z0) → 0
minus(s(z0), s(z1)) → minus(z0, z1)
gcd(0, z0) → z0
gcd(s(z0), 0) → s(z0)
gcd(s(z0), s(z1)) → if_gcd(le(z1, z0), s(z0), s(z1))
if_gcd(true, z0, z1) → gcd(minus(z0, z1), z1)
if_gcd(false, z0, z1) → gcd(minus(z1, z0), z0)
Tuples:

LE(0, z0) → c
LE(s(z0), 0) → c1
LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(z0, 0) → c3
MINUS(0, z0) → c4
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
GCD(0, z0) → c6
GCD(s(z0), 0) → c7
GCD(s(z0), s(z1)) → c8(IF_GCD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_GCD(true, z0, z1) → c9(GCD(minus(z0, z1), z1), MINUS(z0, z1))
IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0))
S tuples:

LE(0, z0) → c
LE(s(z0), 0) → c1
LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(z0, 0) → c3
MINUS(0, z0) → c4
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
GCD(0, z0) → c6
GCD(s(z0), 0) → c7
GCD(s(z0), s(z1)) → c8(IF_GCD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_GCD(true, z0, z1) → c9(GCD(minus(z0, z1), z1), MINUS(z0, z1))
IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0))
K tuples:none
Defined Rule Symbols:

le, minus, gcd, if_gcd

Defined Pair Symbols:

LE, MINUS, GCD, IF_GCD

Compound Symbols:

c, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10

(3) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 6 trailing nodes:

GCD(s(z0), 0) → c7
LE(0, z0) → c
MINUS(z0, 0) → c3
MINUS(0, z0) → c4
LE(s(z0), 0) → c1
GCD(0, z0) → c6

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
minus(z0, 0) → z0
minus(0, z0) → 0
minus(s(z0), s(z1)) → minus(z0, z1)
gcd(0, z0) → z0
gcd(s(z0), 0) → s(z0)
gcd(s(z0), s(z1)) → if_gcd(le(z1, z0), s(z0), s(z1))
if_gcd(true, z0, z1) → gcd(minus(z0, z1), z1)
if_gcd(false, z0, z1) → gcd(minus(z1, z0), z0)
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
GCD(s(z0), s(z1)) → c8(IF_GCD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_GCD(true, z0, z1) → c9(GCD(minus(z0, z1), z1), MINUS(z0, z1))
IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
GCD(s(z0), s(z1)) → c8(IF_GCD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_GCD(true, z0, z1) → c9(GCD(minus(z0, z1), z1), MINUS(z0, z1))
IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0))
K tuples:none
Defined Rule Symbols:

le, minus, gcd, if_gcd

Defined Pair Symbols:

LE, MINUS, GCD, IF_GCD

Compound Symbols:

c2, c5, c8, c9, c10

(5) CdtUsableRulesProof (EQUIVALENT transformation)

The following rules are not usable and were removed:

gcd(0, z0) → z0
gcd(s(z0), 0) → s(z0)
gcd(s(z0), s(z1)) → if_gcd(le(z1, z0), s(z0), s(z1))
if_gcd(true, z0, z1) → gcd(minus(z0, z1), z1)
if_gcd(false, z0, z1) → gcd(minus(z1, z0), z0)

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
minus(z0, 0) → z0
minus(0, z0) → 0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
GCD(s(z0), s(z1)) → c8(IF_GCD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_GCD(true, z0, z1) → c9(GCD(minus(z0, z1), z1), MINUS(z0, z1))
IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
GCD(s(z0), s(z1)) → c8(IF_GCD(le(z1, z0), s(z0), s(z1)), LE(z1, z0))
IF_GCD(true, z0, z1) → c9(GCD(minus(z0, z1), z1), MINUS(z0, z1))
IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0))
K tuples:none
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

LE, MINUS, GCD, IF_GCD

Compound Symbols:

c2, c5, c8, c9, c10

(7) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace GCD(s(z0), s(z1)) → c8(IF_GCD(le(z1, z0), s(z0), s(z1)), LE(z1, z0)) by

GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)), LE(0, z0))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))), LE(s(z0), 0))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
minus(z0, 0) → z0
minus(0, z0) → 0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
IF_GCD(true, z0, z1) → c9(GCD(minus(z0, z1), z1), MINUS(z0, z1))
IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)), LE(0, z0))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))), LE(s(z0), 0))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
IF_GCD(true, z0, z1) → c9(GCD(minus(z0, z1), z1), MINUS(z0, z1))
IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)), LE(0, z0))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))), LE(s(z0), 0))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
K tuples:none
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

LE, MINUS, IF_GCD, GCD

Compound Symbols:

c2, c5, c9, c10, c8

(9) CdtRhsSimplificationProcessorProof (BOTH BOUNDS(ID, ID) transformation)

Removed 2 trailing tuple parts

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
minus(z0, 0) → z0
minus(0, z0) → 0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
IF_GCD(true, z0, z1) → c9(GCD(minus(z0, z1), z1), MINUS(z0, z1))
IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
IF_GCD(true, z0, z1) → c9(GCD(minus(z0, z1), z1), MINUS(z0, z1))
IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
K tuples:none
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

LE, MINUS, IF_GCD, GCD

Compound Symbols:

c2, c5, c9, c10, c8, c8

(11) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace IF_GCD(true, z0, z1) → c9(GCD(minus(z0, z1), z1), MINUS(z0, z1)) by

IF_GCD(true, z0, 0) → c9(GCD(z0, 0), MINUS(z0, 0))
IF_GCD(true, 0, z0) → c9(GCD(0, z0), MINUS(0, z0))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
minus(z0, 0) → z0
minus(0, z0) → 0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(true, z0, 0) → c9(GCD(z0, 0), MINUS(z0, 0))
IF_GCD(true, 0, z0) → c9(GCD(0, z0), MINUS(0, z0))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(true, z0, 0) → c9(GCD(z0, 0), MINUS(z0, 0))
IF_GCD(true, 0, z0) → c9(GCD(0, z0), MINUS(0, z0))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
K tuples:none
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

LE, MINUS, IF_GCD, GCD

Compound Symbols:

c2, c5, c10, c8, c8, c9

(13) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 2 trailing nodes:

IF_GCD(true, z0, 0) → c9(GCD(z0, 0), MINUS(z0, 0))
IF_GCD(true, 0, z0) → c9(GCD(0, z0), MINUS(0, z0))

(14) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
minus(z0, 0) → z0
minus(0, z0) → 0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
K tuples:none
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

LE, MINUS, IF_GCD, GCD

Compound Symbols:

c2, c5, c10, c8, c8, c9

(15) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
We considered the (Usable) Rules:

minus(s(z0), s(z1)) → minus(z0, z1)
minus(z0, 0) → z0
minus(0, z0) → 0
And the Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(GCD(x1, x2)) = x1 + x2   
POL(IF_GCD(x1, x2, x3)) = x2 + x3   
POL(LE(x1, x2)) = 0   
POL(MINUS(x1, x2)) = 0   
POL(c10(x1, x2)) = x1 + x2   
POL(c2(x1)) = x1   
POL(c5(x1)) = x1   
POL(c8(x1)) = x1   
POL(c8(x1, x2)) = x1 + x2   
POL(c9(x1, x2)) = x1 + x2   
POL(false) = 0   
POL(le(x1, x2)) = 0   
POL(minus(x1, x2)) = x1   
POL(s(x1)) = [1] + x1   
POL(true) = 0   

(16) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
minus(z0, 0) → z0
minus(0, z0) → 0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
K tuples:

IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

LE, MINUS, IF_GCD, GCD

Compound Symbols:

c2, c5, c10, c8, c8, c9

(17) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
We considered the (Usable) Rules:

le(s(z0), s(z1)) → le(z0, z1)
le(s(z0), 0) → false
minus(s(z0), s(z1)) → minus(z0, z1)
le(0, z0) → true
minus(z0, 0) → z0
minus(0, z0) → 0
And the Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [2]   
POL(GCD(x1, x2)) = [1] + [2]x1 + [2]x2   
POL(IF_GCD(x1, x2, x3)) = x1 + [2]x2 + [2]x3   
POL(LE(x1, x2)) = 0   
POL(MINUS(x1, x2)) = 0   
POL(c10(x1, x2)) = x1 + x2   
POL(c2(x1)) = x1   
POL(c5(x1)) = x1   
POL(c8(x1)) = x1   
POL(c8(x1, x2)) = x1 + x2   
POL(c9(x1, x2)) = x1 + x2   
POL(false) = [1]   
POL(le(x1, x2)) = [1]   
POL(minus(x1, x2)) = x1   
POL(s(x1)) = [2] + x1   
POL(true) = 0   

(18) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
minus(z0, 0) → z0
minus(0, z0) → 0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
K tuples:

IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

LE, MINUS, IF_GCD, GCD

Compound Symbols:

c2, c5, c10, c8, c8, c9

(19) CdtNarrowingProof (BOTH BOUNDS(ID, ID) transformation)

Use narrowing to replace IF_GCD(false, z0, z1) → c10(GCD(minus(z1, z0), z0), MINUS(z1, z0)) by

IF_GCD(false, 0, z0) → c10(GCD(z0, 0), MINUS(z0, 0))
IF_GCD(false, z0, 0) → c10(GCD(0, z0), MINUS(0, z0))
IF_GCD(false, s(z1), s(z0)) → c10(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))

(20) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
minus(z0, 0) → z0
minus(0, z0) → 0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
IF_GCD(false, 0, z0) → c10(GCD(z0, 0), MINUS(z0, 0))
IF_GCD(false, z0, 0) → c10(GCD(0, z0), MINUS(0, z0))
IF_GCD(false, s(z1), s(z0)) → c10(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(false, 0, z0) → c10(GCD(z0, 0), MINUS(z0, 0))
IF_GCD(false, z0, 0) → c10(GCD(0, z0), MINUS(0, z0))
IF_GCD(false, s(z1), s(z0)) → c10(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
K tuples:

IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

LE, MINUS, GCD, IF_GCD

Compound Symbols:

c2, c5, c8, c8, c9, c10

(21) CdtLeafRemovalProof (BOTH BOUNDS(ID, ID) transformation)

Removed 2 trailing nodes:

IF_GCD(false, z0, 0) → c10(GCD(0, z0), MINUS(0, z0))
IF_GCD(false, 0, z0) → c10(GCD(z0, 0), MINUS(z0, 0))

(22) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
minus(z0, 0) → z0
minus(0, z0) → 0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
IF_GCD(false, s(z1), s(z0)) → c10(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(false, s(z1), s(z0)) → c10(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
K tuples:

IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

LE, MINUS, GCD, IF_GCD

Compound Symbols:

c2, c5, c8, c8, c9, c10

(23) CdtRuleRemovalProof (UPPER BOUND(ADD(n^1)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
We considered the (Usable) Rules:

minus(s(z0), s(z1)) → minus(z0, z1)
minus(z0, 0) → z0
minus(0, z0) → 0
And the Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
IF_GCD(false, s(z1), s(z0)) → c10(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [1]   
POL(GCD(x1, x2)) = [1] + x1 + x2   
POL(IF_GCD(x1, x2, x3)) = x2 + x3   
POL(LE(x1, x2)) = 0   
POL(MINUS(x1, x2)) = 0   
POL(c10(x1, x2)) = x1 + x2   
POL(c2(x1)) = x1   
POL(c5(x1)) = x1   
POL(c8(x1)) = x1   
POL(c8(x1, x2)) = x1 + x2   
POL(c9(x1, x2)) = x1 + x2   
POL(false) = 0   
POL(le(x1, x2)) = 0   
POL(minus(x1, x2)) = x1   
POL(s(x1)) = [1] + x1   
POL(true) = 0   

(24) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
minus(z0, 0) → z0
minus(0, z0) → 0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
IF_GCD(false, s(z1), s(z0)) → c10(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
IF_GCD(false, s(z1), s(z0)) → c10(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
K tuples:

IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

LE, MINUS, GCD, IF_GCD

Compound Symbols:

c2, c5, c8, c8, c9, c10

(25) CdtKnowledgeProof (BOTH BOUNDS(ID, ID) transformation)

The following tuples could be moved from S to K by knowledge propagation:

IF_GCD(false, s(z1), s(z0)) → c10(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))

(26) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
minus(z0, 0) → z0
minus(0, z0) → 0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
IF_GCD(false, s(z1), s(z0)) → c10(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
S tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
K tuples:

IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(false, s(z1), s(z0)) → c10(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

LE, MINUS, GCD, IF_GCD

Compound Symbols:

c2, c5, c8, c8, c9, c10

(27) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

LE(s(z0), s(z1)) → c2(LE(z0, z1))
We considered the (Usable) Rules:

minus(s(z0), s(z1)) → minus(z0, z1)
minus(z0, 0) → z0
minus(0, z0) → 0
And the Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
IF_GCD(false, s(z1), s(z0)) → c10(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(GCD(x1, x2)) = x2 + [2]x1·x2   
POL(IF_GCD(x1, x2, x3)) = [2] + [2]x2·x3   
POL(LE(x1, x2)) = x1   
POL(MINUS(x1, x2)) = 0   
POL(c10(x1, x2)) = x1 + x2   
POL(c2(x1)) = x1   
POL(c5(x1)) = x1   
POL(c8(x1)) = x1   
POL(c8(x1, x2)) = x1 + x2   
POL(c9(x1, x2)) = x1 + x2   
POL(false) = 0   
POL(le(x1, x2)) = 0   
POL(minus(x1, x2)) = x1   
POL(s(x1)) = [2] + x1   
POL(true) = 0   

(28) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
minus(z0, 0) → z0
minus(0, z0) → 0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
IF_GCD(false, s(z1), s(z0)) → c10(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
S tuples:

MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
K tuples:

IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(false, s(z1), s(z0)) → c10(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
LE(s(z0), s(z1)) → c2(LE(z0, z1))
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

LE, MINUS, GCD, IF_GCD

Compound Symbols:

c2, c5, c8, c8, c9, c10

(29) CdtRuleRemovalProof (UPPER BOUND(ADD(n^2)) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
We considered the (Usable) Rules:

minus(s(z0), s(z1)) → minus(z0, z1)
minus(z0, 0) → z0
minus(0, z0) → 0
And the Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
IF_GCD(false, s(z1), s(z0)) → c10(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(GCD(x1, x2)) = x1·x2   
POL(IF_GCD(x1, x2, x3)) = x2·x3   
POL(LE(x1, x2)) = 0   
POL(MINUS(x1, x2)) = x2   
POL(c10(x1, x2)) = x1 + x2   
POL(c2(x1)) = x1   
POL(c5(x1)) = x1   
POL(c8(x1)) = x1   
POL(c8(x1, x2)) = x1 + x2   
POL(c9(x1, x2)) = x1 + x2   
POL(false) = 0   
POL(le(x1, x2)) = [2] + [2]x1 + [2]x22 + x1·x2 + x12   
POL(minus(x1, x2)) = x1   
POL(s(x1)) = [1] + x1   
POL(true) = 0   

(30) Obligation:

Complexity Dependency Tuples Problem
Rules:

le(0, z0) → true
le(s(z0), 0) → false
le(s(z0), s(z1)) → le(z0, z1)
minus(z0, 0) → z0
minus(0, z0) → 0
minus(s(z0), s(z1)) → minus(z0, z1)
Tuples:

LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
IF_GCD(false, s(z1), s(z0)) → c10(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
S tuples:none
K tuples:

IF_GCD(true, s(z0), s(z1)) → c9(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
GCD(s(z0), s(0)) → c8(IF_GCD(true, s(z0), s(0)))
GCD(s(s(z1)), s(s(z0))) → c8(IF_GCD(le(z0, z1), s(s(z1)), s(s(z0))), LE(s(z0), s(z1)))
GCD(s(0), s(s(z0))) → c8(IF_GCD(false, s(0), s(s(z0))))
IF_GCD(false, s(z1), s(z0)) → c10(GCD(minus(z0, z1), s(z1)), MINUS(s(z0), s(z1)))
LE(s(z0), s(z1)) → c2(LE(z0, z1))
MINUS(s(z0), s(z1)) → c5(MINUS(z0, z1))
Defined Rule Symbols:

le, minus

Defined Pair Symbols:

LE, MINUS, GCD, IF_GCD

Compound Symbols:

c2, c5, c8, c8, c9, c10

(31) SIsEmptyProof (BOTH BOUNDS(ID, ID) transformation)

The set S is empty

(32) BOUNDS(1, 1)